The use of compression algorithms for efficient data storage and communication has become a key component in most digital imaging systems. In many applications a reduction in the amount of resources required to store or transmit data is crucial, so that compression can be viewed as an enabling technology. Image compression algorithms are broadly classified into lossy (irreversible) schemes, for which the original pixel intensities cannot be perfectly recovered from the encoded bit stream, lossless (reversible) schemes, for which the coding algorithms yield decompressed images identical to the original digitized images, and near- lossless schemes, where the error, pixel-by-pixel, between the original and reconstructed images is bounded by a pre-determined value.
One example of a lossless/near-lossless image compressor system is known as JPEG-LS. JPEG-LS is described in "JPEG-LS: Lossless/near-loss image compression, "Committee Draft 14495, ISO/IEC JTC 1/SC 29/WG 1, March 1997, the entire disclosure of which is incorporated herein by reference.
FIG. 1 is a block diagram of a lossless/near-lossless encoding system like JPEG-LS and is described in greater detail below. Other related compression systems are described in U.S. patent application Ser. No. 08/503,792 entitled "System and Method for Lossless Image Compression", filed Jul. 18, 1995 now U.S. Pat. No. 5,680,129 and U.S. patent application Ser. No. 08/706,010, entitled "System and Method for Lossless Image Compression Having Improved Sequential Determination of Golomb Parameter", filed Aug. 30, 1996, now U.S. Pat. No. 5,764,374 both of which are incorporated herein by reference.
An ever important goal in the image compression art is to reduce the number of bits required to encode an image. One technique used in JPEG-LS to achieve a high compression rate is to encode runs of consecutive pixels that are bound with respect to the last pixel before the run by a pre-defined value (near) using a code indicative of the length of the run.
In JPEG-LS the encoder uses previously encoded data to detect "flat zones," in which case the encoder enters run mode. In run mode, encoding is done on runs of consecutive samples of value equal to the last encoded sample (lossless) or of values that are within the maximal allowed error near of the last encoded sample (near-lossless mode).
In certain applications, small variations in "unimportant" information in an image can throw the encoder out of run mode. For example, in many photographic images, the background is of relatively low importance in terms of content and is often of nearly uniform color and light intensity. Similarly, in many scanned images due to artifacts from the scanning process, what would ideally be a solid area may contain certain pixels that have digitized values that are slightly off from their neighbors. Such variations make runs much shorter than what should be encoded as runs to achieve a better compression rate.
It is therefore desireable to have an encoder that improves run length encoding in "unimportant" areas without losing detail in "important" areas of images. "Important" and "unimportant" may be subjective terms, but generally solid regions, such as background, contain less important information than regions with large pixel-to-pixel variations in pixel values.
JPEG-LS is a standard that specifies a particular algorithm for decoding of images that have been encoded according to the standard. It would be desirable to achieve better run length encoding of images while allowing end-users to decode the images using a standard unmodified JPEG-LS decoder.